﻿@model NOSDC.Pocos.Document
@{
    ViewBag.Title = "UpdateDocument";
}
<h2>
    UpdateDocument</h2>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Document</legend>
        <div class="editor-label">
            <strong>@Html.LabelFor(model => model.Title)</strong>
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.Title, new { style = "width:400px;" })
            @Html.ValidationMessageFor(model => model.Title)
        </div>
        <div>
            <div class="editor-label">
                <strong>@Html.LabelFor(model => model.Description)</strong>
            </div>
            <div class="editor-field">
                @Html.TextAreaFor(model => model.Description, new { style = "width:400px;" })
                @Html.ValidationMessageFor(model => model.Description)
            </div>
        </div>
        <div id="afterUpload">
            <div>
                <div class="editor-label">
                    <strong>File Name: </strong>@Html.TextBoxFor(model => model.FileName, new {@readonly = true, @class = "TextBoxAsLabel", style = "width:400px;"})
                </div>
            </div>
            <div>
                <div class="editor-label">
                    <strong>File Size (bytes):</strong> @Html.TextBoxFor(model => model.FileSize, new {@readonly = true, @class = "TextBoxAsLabel", style = "width:400px;"})
                </div>
            </div>
            <div>
                <div class="editor-label">
                    <strong>Upload Date:</strong> @Html.TextBoxFor(model => model.UploadDate, new {@readonly = true, @class = "TextBoxAsLabel", style = "width:400px;"})
                </div>
            </div>
        </div>

        <p>
            @Html.HiddenFor(model => model.DocumentID)
            @Html.HiddenFor(model => model.DocumentType)
            @Html.HiddenFor(model => model.FileName)
            @Html.HiddenFor(model => model.FileSize)
            @Html.HiddenFor(model => model.Filepath)
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}
<div>
    @Html.ActionLink("Back to List", "Index")
</div>
